﻿using System;
using System.Collections.Generic;
using System.Text;

namespace NLBS.Views
{
    public interface IAction<T>
    {
        T Entity { set; get; }
        int keyID { get; set; }
        event EventHandler DataInsert;
        event EventHandler DataUpdate;
        event EventHandler DataDelete;
        event EventHandler DataSelectSingle;
    }

    public abstract class Extensions<T>
    {
      public IAction<T> Action { set; get; }

      public event EventHandler<EventArgs> DataInserting;

      public event EventHandler<EventArgs> DataInserted;

      public virtual void OnInserting(EventArgs e)
      {
          if (DataInserting != null)
          {
              DataInserting(this, e);
          }
      }

    }
}
